$colormain:#1890FF;
$colornormal:#515151;
$colorlow:#747474;
$colortheme:#436be6;
$colordanger:#fb1418;
$colorgray:#bdbdbd;
$colorsuccess:#7cb342;
$colorwarning:#ff9800;
$colorsecondry: #03a9f4;

// 新
$colorborder:#e8e8e8;

// 背景图片地址和大小
@mixin bis($url) {
  background-image: url($url);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

//定位全屏
@mixin allcover {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

//定位上下左右居中
@mixin center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

//定位上下居中
@mixin ct {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

//定位水品居中
@mixin cl {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

//宽高
@mixin wh($width, $height) {
  width: $width;
  height: $height;
}

//字体大小、行高、字体
@mixin font($size, $line-height, $family: 'Microsoft YaHei') {
  font: #{$size}/#{$line-height} $family;
}

//字体大小，颜色
@mixin sc($size, $color) {
  font-size: $size;
  color: $color;
}

//flex 布局和 子元素 对其方式
@mixin fj($type: space-between) {
  display: flex;
  align-items: center;
  justify-content: $type;
}

@mixin col() {
  display: flex;
  flex-direction: column;
}

@mixin row() {
  display: flex;
  align-items: center;
}

.color-white {
  color: #fff;
}

.color-primary {
  color: $colortheme;
}

.color-danger {
  color: $colordanger;
}

.color-success {
  color: $colorsuccess;
}

.color-warning {
  color: $colorwarning;
}

.color-secondry {
  color: $colorsecondry;
}

.color-gray {
  color: $colorlow;
}

// 三角形箭头
@mixin border-arrow($direction, $borderColor:$colornormal, $size:5px, $sizeY: $size) {
  content: "";
  height: 0;
  width: 0;

  @if $direction==top {
    border-bottom: $sizeY solid $borderColor;
    border-left: $size dashed transparent;
    border-right: $size dashed transparent;
  }

  @else if $direction==right {
    border-left: $size solid $borderColor;
    border-top: $size dashed transparent;
    border-bottom: $size dashed transparent;
  }

  @else if $direction==bottom {
    border-top: $size solid $borderColor;
    border-left: $size dashed transparent;
    border-right: $size dashed transparent;
  }

  @else if $direction==left {
    border-right: $size solid $borderColor;
    border-top: $size dashed transparent;
    border-bottom: $size dashed transparent;
  }
}


// 多行省略
@mixin multiline-overflow($line: 2) {
  word-break: break-all;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: $line;
  -webkit-box-orient: vertical;
}

// 浮动按钮
@mixin fixed-btn($bottom:75px) {
  position: fixed;
  right: 18px;
  height: 60px;
  width: 60px;
  background: rgba(255, 255, 255, 1);
  border-radius: 100%;
  border: 1px solid #e8e8e8;
  box-shadow: 4.5px 7.5px 24px 0px rgba(65, 65, 65, 0.1);
  overflow: hidden;
  z-index: 80;
  line-height: 60px;
  color: #747474;
  text-align: center;
  bottom: $bottom;

  .iconfont {
    display: block;
    font-size: 31.5px;
  }
}

@mixin placeholder($color) {
  &::-webkit-input-placeholder {
    color: $color;
  }

  &:-moz-placeholder {
    color: $color;
  }

  &::-moz-placeholder {
    color: $color;
  }

  &:-ms-input-placeholder {
    color: $color;
  }
}

@mixin transparent-input {
  outline: none;
  border: none;
  background: transparent;
  background-color: transparent !important;
}

// layout
@mixin aside {
  position: absolute;
  width: 560px;
  top: 96px;
  bottom: 0;
  left: 0;
  height: calc(100vh - 96px);
  box-sizing: border-box;
  border-right: 16px solid #f0f0f0;
}

@mixin content {
  position: absolute;
  width: 1360px;
  top: 96px;
  bottom: 0;
  right: 0;
  height: calc(100vh - 96px);
}

// scroll
::-webkit-scrollbar {
  width: 8px;
  background: hsla(0, 0%, 100%, 0.6);
}

::-webkit-scrollbar-track {
  border-radius: 0;
}

::-webkit-scrollbar-thumb {
  border-radius: 0;
  background-color: rgba(95, 95, 95, 0.4);
  transition: all 0.2s;
  border-radius: 0.5rem;

  &:hover {
    background-color: rgba(95, 95, 95, 0.7);
  }
}